﻿// -----------------------------------------------------------------------
// <copyright file="BpdsRoot.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Pap
{
	using System.Xml.Serialization;
	using Zen.BlackBerry.Pap.Control;
	using Zen.BlackBerry.Pap.Parser;

	/// <summary>
	/// Represents the root of a RIM specific PAP XML message.
	/// </summary>
	[XmlRoot(ElementName = "bpds")]
	public class BpdsRoot
	{
		/// <summary>
		/// Gets or sets the request.
		/// </summary>
		/// <value>The request.</value>
		[XmlElement(ElementName = "subscriptionquery-message", Type = typeof(SubscriptionQueryControl))]
		public PapControl Request
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the response.
		/// </summary>
		/// <value>The response.</value>
		[XmlElement(ElementName = "badmessage-response", Type = typeof(BadMessageResponse))]
		[XmlElement(ElementName = "subscriptionquery-response", Type = typeof(SubscriptionQueryResponse))]
		public PapMessage Response
		{
			get;
			set;
		}
	}
}
